home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
cpio.z
/
cpio
Wrap
Text File
|
1998-10-20
|
30KB
|
529 lines
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
NNNNAAAAMMMMEEEE
_cccc_pppp_iiii_oooo - copy file archives in and out
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
_cccc_pppp_iiii_oooo _----_iiii[_bbbb_BBBB_cccc_dddd_ffff_kkkk_mmmm_rrrr_ssss_SSSS_tttt_uuuu_vvvv_TTTT_VVVV_6666] [_----_CCCC _b_u_f_s_i_z_e] [_----_EEEE _f_i_l_e] [_----_HHHH _h_d_r] [_----_IIII _f_i_l_e [_----_MMMM
_m_e_s_s_a_g_e]] [_----_RRRR _I_D]] [_p_a_t_t_e_r_n . . .]
_cccc_pppp_iiii_oooo _----_oooo[_aaaa_AAAA_BBBB_cccc_KKKK_LLLL_vvvv_VVVV_WWWW] [_----_CCCC _b_u_f_s_i_z_e] [_----_HHHH _h_d_r] [_----_OOOO _f_i_l_e [_----_MMMM _m_e_s_s_a_g_e]]
_cccc_pppp_iiii_oooo _----_pppp[_aaaa_dddd_llll_LLLL_mmmm_uuuu_vvvv_VVVV_WWWW] [_----_RRRR _I_D] _d_i_r_e_c_t_o_r_y
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _----_iiii, _----_oooo, and _----_pppp options select the action to be performed. The
following list describes each of the actions (which are mutually
exclusive).
_cccc_pppp_iiii_oooo _----_iiii (copy in) extracts files from the standard input, which is
assumed to be the product of a previous _cccc_pppp_iiii_oooo _----_oooo. Only files with names
that match _p_a_t_t_e_r_n_s are selected. _p_a_t_t_e_r_n_s are regular expressions given
in the filename-generating notation of _ssss_hhhh(1). In _p_a_t_t_e_r_n_s, meta-
characters _????, _****, and _[[[[ . . . _]]]] match the slash (_////) character, and
backslash (_\\\\) is an escape character. A _!!!! meta-character means _n_o_t.
(For example, the _!!!!_aaaa_bbbb_cccc_**** pattern would exclude all files that begin with
_aaaa_bbbb_cccc.) Multiple _p_a_t_t_e_r_n_s may be specified and if no _p_a_t_t_e_r_n_s are
specified, the default for _p_a_t_t_e_r_n_s is _**** (that is, select all files).
Each pattern must be enclosed in double quotes; otherwise, the name of a
file in the current directory might be used. Extracted files are
conditionally created and copied into the current directory tree based on
the options described below.
The permissions of the files will be the same as those at the time of the
previous _cccc_pppp_iiii_oooo _----_oooo, subject to modification by the current _u_m_a_s_k value.
Use a _u_m_a_s_k of 0 if you want the modes to match the original modes. The
owner and group of these files will be those of the current user, unless
the current user is super-user. If this is true, the permissions, owner,
and group of the files will be the same as those at the time of the
previous _cccc_pppp_iiii_oooo _----_oooo.
NOTE: If _cccc_pppp_iiii_oooo _----_iiii tries to create a file that already exists and the
existing file is the same age or younger (newer), _cccc_pppp_iiii_oooo will output a
warning message and not replace the file. (The _----_uuuu option can be used to
overwrite, unconditionally, the existing file.) If file names are given
as absolute pathnames to _cccc_pppp_iiii_oooo _----_oooo, then when the files are restored via
_cccc_pppp_iiii_oooo _----_iiii, they will be written to their original directories regardless of
the current directory. This behavior can be circumvented by using the _----_rrrr
option.
_cccc_pppp_iiii_oooo _----_oooo (copy out) reads the standard input to obtain a list of pathnames
and copies those files onto the standard output together with pathname
and status information.
PPPPaaaaggggeeee 1111
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
_cccc_pppp_iiii_oooo _----_pppp (pass) reads the standard input to obtain a list of pathnames of
files that are conditionally created and copied into the destination
_d_i_r_e_c_t_o_r_y tree based on the options described below.
_cccc_pppp_iiii_oooo processes supplementary code set characters, and recognizes
supplementary code set characters in the _m_e_s_s_a_g_e given to the _\\\\_----_MMMM option
(see below) according to the locale specified in the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE environment
variable [see _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)]. In regular expressions, pattern
searches are performed on characters, not bytes, as described on _ssss_hhhh(1).
Under the _\\\\_----_vvvv_tttt option (see below), the date is displayed according to the
locale specified in the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE environment variable.
The meanings of the available options are
_----_aaaa Reset access times of input files after they have been copied.
Access times are not reset for linked files when _cccc_pppp_iiii_oooo _----_pppp_llll_aaaa is
specified (mutually exclusive with _----_mmmm). See NOTES (see below) for
additional error information.
_----_AAAA Append files to an archive. The _----_AAAA option requires the _----_OOOO option.
Valid only with archives that are files, or that are on floppy
diskettes or hard disk partitions.
_----_bbbb Reverse the order of the bytes within each word. (Use only with the
_----_iiii option.)
_----_BBBB Input/output is to be blocked 5120 bytes to the record. The default
buffer size is device dependent when neither this nor the _----_CCCC option
is used. (_----_BBBB does not apply to the _pppp_aaaa_ssss_ssss option.)
_----_cccc Read or write header information in ASCII character form for
portability. Always use this option (or the _----_HHHH option) when the
origin and the destination machines are different types (mutually
exclusive with _----_HHHH and _----_6666). (The _----_cccc option implies expanded device
numbers, thus is not POSIX compliant)
_----_CCCC _b_u_f_s_i_z_e
Input/output is to be blocked _b_u_f_s_i_z_e bytes to the record, where
_b_u_f_s_i_z_e is replaced by a positive integer. The default buffer size
is device dependent when neither this nor the _----_BBBB option is used.
(_----_CCCC does not apply to the _pppp_aaaa_ssss_ssss option.)
_----_dddd Directories are to be created as needed.
_----_EEEE _f_i_l_e
Specify an input file (_f_i_l_e) that contains a list of filenames to be
extracted from the archive (one filename per line).
_----_ffff Copy in all files except those in _p_a_t_t_e_r_n_s. (See the paragraph on
_cccc_pppp_iiii_oooo _----_iiii for a description of _p_a_t_t_e_r_n_s.)
PPPPaaaaggggeeee 2222
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
_----_HHHH _h_d_r
Read or write header information in _h_d_r format. Always use this
option or the _----_cccc option when the origin and the destination machines
are different types (mutually exclusive with _----_cccc and _----_6666). Valid
values for _h_d_r are:
_cccc_rrrr_cccc or _CCCC_RRRR_CCCC ASCII header with expanded device numbers and an
additional per-file checksum (Not POSIX compliant,
since header format is different)
_uuuu_ssss_tttt_aaaa_rrrr or _UUUU_SSSS_TTTT_AAAA_RRRR IEEE/P1003 Data Interchange Standard header and
format
_tttt_aaaa_rrrr or _TTTT_AAAA_RRRR _tttt_aaaa_rrrr header and format
_oooo_dddd_cccc ASCII header with small device numbers
_----_IIII _f_i_l_e
Read the contents of _f_i_l_e as an input archive. If _f_i_l_e is a
character special device, and the current medium has been completely
read, replace the medium and press RETURN to continue to the next
medium.
The specified _f_i_l_e can also reference a remote tape device. A remote
tape device name has the form:
[_u_s_e_r@]system:/dev/???
Where _s_y_s_t_e_m is the remote system, /_d_e_v/??? is the particular drive
on the remote system (raw, rewinding, non-rewinding, etc.), and the
optional _u_s_e_r is the login name to be used on the remote system, if
different from the current user's login name.
This option is used only with the _----_iiii option.
_----_kkkk Attempt to skip corrupted file headers and I/O errors that may be
encountered. If you want to copy files from a medium that is
corrupted or out of sequence, this option lets you read only those
files with good headers. (For _cccc_pppp_iiii_oooo archives that contain other _cccc_pppp_iiii_oooo
archives, if an error is encountered _cccc_pppp_iiii_oooo may terminate prematurely.
_cccc_pppp_iiii_oooo will find the next good header, which may be one for a smaller
archive, and terminate when the smaller archive's trailer is
encountered.) Used only with the _----_iiii option.
_----_KKKK Required for files larger than 2 Gigabytes. _CCCC_pppp_iiii_oooo will issue a
warning and skip such files if an attempt is made to archive them
without specifying the _----_KKKK flag. Used only with the _----_oooo option.
Mutually exclusive with _----_cccc, _----_HHHH options. Because the _----_cccc option can
not be used, device files with large minor or major numbers could
not normally be archived; the binary format is extended with this
option so that those device files can be backed up, but will not be
able to be restored on older or non-IRIX versions of _cccc_pppp_iiii_oooo with the
PPPPaaaaggggeeee 3333
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
correct major and minor number. Warning: Use of this option may
result in the creation of an archive that is not portable to other
machines; a warning is issued on the first file causing the archive
to not be portable.
_----_llll Whenever possible, link files rather than copying them. (Usable
only with the _----_pppp option.) If the link fails a error message will be
displayed and then _cccc_pppp_iiii_oooo will attempt to copy the file.
_----_LLLL Follow symbolic links. The default is not to follow symbolic links.
_----_mmmm Retain previous file modification time. The modification time and
access time of a restored file is set to the modification time of
the file when it was backed up. This option is ineffective on
directories that are being copied. This option is mutually
exclusive with _----_aaaa.
_----_MMMM _m_e_s_s_a_g_e
Define a _m_e_s_s_a_g_e to use when switching media. When you use the _----_OOOO
or _----_IIII options and specify a character special device, you can use
this option to define the message that is printed when you reach the
end of the medium. One _%%%%_dddd can be placed in _m_e_s_s_a_g_e to print the
sequence number of the next medium needed to continue. _m_e_s_s_a_g_e may
contain supplementary code set characters.
_----_OOOO _f_i_l_e
Direct the output of _cccc_pppp_iiii_oooo to _f_i_l_e. If _f_i_l_e is a character special
device and the current medium is full, replace the medium and press
the RETURN key to continue to the next medium. Use only with the _----_oooo
option.
_----_rrrr Interactively rename files. If the user presses the RETURN key
alone, the file is skipped. If the user types a ``.'' the original
pathname will be retained. (Not available with _cccc_pppp_iiii_oooo _----_pppp.)
_----_RRRR _I_D
Reassign ownership and group information for each file to user _I_D
(_I_D must be a valid user ID from _////_eeee_tttt_cccc_////_pppp_aaaa_ssss_ssss_wwww_dddd). This option is valid
only for a super-user.
_----_ssss Swap bytes within each half word.
_----_SSSS Swap halfwords within each word.
_----_tttt Print a table of contents of the input. No files are created
(mutually exclusive with _----_VVVV).
_----_TTTT Test (verify) the contents of the archive against the files in the
filesystem. A _==== is printed in the first column if the file is the
same, otherwise _!!!!. If given as _----_TTTT_TTTT, a second _==== or _!!!! is output,
based on the owner, group, and permissions matching, and in the case
of symbolic links, the contents of the symbolic link.
PPPPaaaaggggeeee 4444
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
_----_WWWW Detect and handle specially files with holes (sections of a file
with no disk blocks allocated to it, normally caused by seeking over
a section of the file while it is being created). Holey files are
marked specially in the archive, and a block map is written at the
start of a file. Only the non-hole sections are written to the
archive, normally requiring much less space than when this option is
not used.
When used, and holey files are found, the archive will not be
compatible with other versions of _cccc_pppp_iiii_oooo (non-IRIX versions, or IRIX
versions older than IRIX 6.5); a warning is issued on the first file
causing the archive to not be portable. Used only with the _----_oooo
option. Mutually exclusive with _----_cccc, _----_HHHH options. When the _----_vvvv option
is used, the type is printed as _HHHH for holey files, rather than _----.
_----_uuuu Copy unconditionally (normally, an older file will not replace a
newer file with the same name).
_----_vvvv Verbose: causes a list of file names to be printed. When used with
the _----_tttt option, the table of contents looks like the output of an _llll_ssss
_----_llll command [see _llll_ssss(1)]; dates are displayed according to the locale
specified in the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE environment variable [see _LLLL_AAAA_NNNN_GGGG on
_eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)].
_----_VVVV Special Verbose: print a dot for each file read or written. Useful
to assure the user that _cccc_pppp_iiii_oooo is working without printing out all
file names.
_----_6666 Process a UNIX System Sixth Edition archive format file. Use only
with the _----_iiii option (mutually exclusive with _----_cccc and _----_HHHH)).
Note: _cccc_pppp_iiii_oooo assumes four-byte words.
If, when writing to a character device (_----_oooo) or reading from a character
device
(_----_iiii), _cccc_pppp_iiii_oooo reaches the end of a medium (such as the end of a tape), and
the
_----_OOOO and _----_IIII options aren't used, _cccc_pppp_iiii_oooo will print the following message:
_IIII_ffff _yyyy_oooo_uuuu _wwww_aaaa_nnnn_tttt _tttt_oooo _gggg_oooo _oooo_nnnn_,,,, _tttt_yyyy_pppp_eeee _dddd_eeee_vvvv_iiii_cccc_eeee_////_ffff_iiii_llll_eeee _nnnn_aaaa_mmmm_eeee _wwww_hhhh_eeee_nnnn _rrrr_eeee_aaaa_dddd_yyyy_....
To continue, you must replace the medium and type the character special
device name (_////_dddd_eeee_vvvv_////_tttt_aaaa_pppp_eeee for example) and press RETURN. You may want to
continue by directing _cccc_pppp_iiii_oooo to use a different device. For example, if
you have two tape drives you may want to switch between them so _cccc_pppp_iiii_oooo can
proceed while you are changing the tapes. (Simply pressing RETURN causes
the _cccc_pppp_iiii_oooo process to exit.)
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
The following examples show three uses of _cccc_pppp_iiii_oooo.
PPPPaaaaggggeeee 5555
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
When standard input is directed through a pipe to _cccc_pppp_iiii_oooo _----_oooo, files are
grouped so they can be directed (>) to a single file (_...._...._////_nnnn_eeee_wwww_ffff_iiii_llll_eeee). The
_----_cccc option insures that the file will be portable to other machines (as
would the _----_HHHH option). Instead of _llll_ssss(1), you could use _ffff_iiii_nnnn_dddd(1), _eeee_cccc_hhhh_oooo(1),
_cccc_aaaa_tttt(1), and so on, to pipe a list of names to _cccc_pppp_iiii_oooo. You could direct the
output to a device instead of a file.
_llll_ssss _|||| _cccc_pppp_iiii_oooo _----_oooo_cccc _>>>> _...._...._////_nnnn_eeee_wwww_ffff_iiii_llll_eeee
_cccc_pppp_iiii_oooo _----_iiii uses the output file of _cccc_pppp_iiii_oooo _----_oooo (directed through a pipe with _cccc_aaaa_tttt
in the example below), extracts those files that match the patterns
(_mmmm_eeee_mmmm_oooo_////_aaaa_1111, _mmmm_eeee_mmmm_oooo_////_bbbb_****), creates directories below the current directory as
needed (_----_dddd option), and places the files in the appropriate directories.
The _----_cccc option is used if the input file was created with a portable
header. If no patterns were given, all files from _nnnn_eeee_wwww_ffff_iiii_llll_eeee would be
placed in the directory.
_cccc_aaaa_tttt _nnnn_eeee_wwww_ffff_iiii_llll_eeee _|||| _cccc_pppp_iiii_oooo _----_iiii_cccc_dddd _""""_mmmm_eeee_mmmm_oooo_////_aaaa_1111_"""" _""""_mmmm_eeee_mmmm_oooo_////_bbbb_****_""""
_cccc_pppp_iiii_oooo _----_pppp takes the file names piped to it and copies or links (_----_llll option)
those files to another directory (_nnnn_eeee_wwww_dddd_iiii_rrrr in the example below). The _----_dddd
option says to create directories as needed. The _----_mmmm option says retain
the modification time. (It is important to use the _----_dddd_eeee_pppp_tttt_hhhh option of
_ffff_iiii_nnnn_dddd(1) to generate pathnames for _cccc_pppp_iiii_oooo. This eliminates problems _cccc_pppp_iiii_oooo
could have trying to create files under read-only directories.) The
destination directory, _nnnn_eeee_wwww_dddd_iiii_rrrr, must exist.
_ffff_iiii_nnnn_dddd _.... _----_dddd_eeee_pppp_tttt_hhhh _----_pppp_rrrr_iiii_nnnn_tttt _|||| _cccc_pppp_iiii_oooo _----_pppp_dddd_llll_mmmm_vvvv _nnnn_eeee_wwww_dddd_iiii_rrrr
Note that when you use _cccc_pppp_iiii_oooo in conjunction with _ffff_iiii_nnnn_dddd, if you use the _----_LLLL
option with _cccc_pppp_iiii_oooo then you must use the _----_ffff_oooo_llll_llll_oooo_wwww option with _ffff_iiii_nnnn_dddd and vice
versa. Otherwise there will be undesirable results.
FFFFIIIILLLLEEEESSSS
_////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS_////_uuuu_xxxx_cccc_oooo_rrrr_eeee_...._aaaa_bbbb_iiii
language-specific message file [See _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn (5).]
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_aaaa_rrrr(1), _cccc_aaaa_tttt(1), _eeee_cccc_hhhh_oooo(1), _ffff_iiii_nnnn_dddd(1), _llll_ssss(1), _tttt_aaaa_rrrr(1), _uuuu_mmmm_aaaa_ssss_kkkk(1), _aaaa_tttt_tttt_rrrr(1),
_xxxx_ffff_ssss_dddd_uuuu_mmmm_pppp(1m), _aaaa_rrrr_cccc_hhhh_iiii_vvvv_eeee_ssss(4)
NNNNOOOOTTTTEEEESSSS
An archive created with the _----_cccc option (defaults to an ASCII header with
expanded device numbers and an additional per-file checksum - _CCCC_RRRR_CCCC) on a
Release 4 system cannot be read on System V Release 3.2 systems, or
earlier.
Use the _----_HHHH _oooo_dddd_cccc option in the current version of _cccc_pppp_iiii_oooo (ie. IRIX 5.X
Operating system), which is equivalent to the header created by the _----_cccc
option in earlier System V releases (ie. IRIX 4.0.X Operating System).
This is to be used when reading previously created _cccc_pppp_iiii_oooo image(s) on a
System V Release 4 systems (ie. IRIX 5.X Operating system).
PPPPaaaaggggeeee 6666
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
_cccc_pppp_iiii_oooo will issue a warning and continue archiving when the block or
character device numbers are truncated when using the _----_HHHH _oooo_dddd_cccc option.
_cccc_pppp_iiii_oooo will issue a warning and continue archiving when the userid or group
id of associated with a file is too large. The userid for the user
``nobody'' will be substituted. The limits are 65535 for binary
(default) format, and 262143 for _----_HHHH _uuuu_ssss_tttt_aaaa_rrrr, _----_HHHH _tttt_aaaa_rrrr and _----_HHHH _oooo_dddd_cccc formats.
There is no limit for _----_HHHH _cccc_rrrr_cccc or _----_cccc formats.
It is common to construct a list of file names with ffffiiiinnnndddd or other
commands to pipe to cpio. Filenames with embedded white space will work
this way, with the exception of filenames with embedded newlines, since
each filename in the list is terminated by a newline. This may sometimes
produce confusing error messages.
If the _BBBB_yyyy_tttt_eeee _ssss_wwww_aaaa_pppp_pppp_eeee_dddd _dddd_aaaa_tttt_aaaa _---- _rrrr_eeee_----_tttt_rrrr_yyyy _wwww_iiii_tttt_hhhh _cccc_oooo_rrrr_rrrr_eeee_cccc_tttt _dddd_eeee_vvvv_iiii_cccc_eeee message occurs,
check to make sure that the correct device (switched or non-switched) is
begin used to dump the media (see _tttt_pppp_ssss(7M)).
Path names are restricted to 256 characters for the binary (the default)
and _----_HHHH _oooo_dddd_cccc header formats. Otherwise, pathnames are restricted to 1024
characters.
Only a super-user user can copy special files. Additionally, when
running from a setuid program (or if made setuid itself), some files may
still not be accessible, since the effective userid is checked in several
places, rather than the real userid. This is deliberate.
Blocks are reported in 512-byte quantities.
If a file has _0000_0000_0000 permissions, contains more than 0 characters of data,
and the user does not have the appropriate access to the file, the file
will not be saved or restored.
The default buffer size is optimized for the device and using the _----_CCCC
option to specify a different block size may cause _cccc_pppp_iiii_oooo to fail.
Therefore, care must be taken when choosing the block size. To avoid
wasting space on streaming tape drives, the _----_CCCC option with an appropriate
block size should be used.
When using the _----_aaaa option (resets the access times of the input files)
_cccc_pppp_iiii_oooo cannot reset the access time of the files in /dev/fd. This is
because these are special "file descriptor files" (see _ffff_dddd(4)). These
"file descriptor files" cannot have there access times reset with _cccc_pppp_iiii_oooo or
_uuuu_tttt_iiii_mmmm_eeee(2). _cccc_pppp_iiii_oooo with the _----_aaaa option will issue the warning message(s)
"Cannot reset time on "/dev/fd/XX" : Operation not supported" when
confronted with these files.
Extended Attributes are not archived or restored. See _aaaa_tttt_tttt_rrrr(1) for more
information about Extended Attributes and see _xxxx_ffff_ssss_dddd_uuuu_mmmm_pppp(1m) for a method to
back them up.
PPPPaaaaggggeeee 7777
ccccppppiiiioooo((((1111)))) ccccppppiiiioooo((((1111))))
PPPPaaaaggggeeee 8888